

$path_base = '/Users/healer/git/healer.com'



class CSS

	#
	def combine_css_file css_file_name
		css_file_name.gsub!(/"/, '')
		css_file_name.gsub!(/'/, '')
		fn = File.join($path_base, css_file_name)
		if File.exists? fn
			p fn
		end

	end

	# 
	def combine_css_files main_css

		path = File.dirname(main_css)
		
		main_file = File.new main_css, 'r'
		main_file.each_line{
			|line|
			if line.start_with?('@import')
				line.scan(/\((.*)\)/){
					|a|
					combine_css_file(a[0])
				}
			end
			
		}
	end
end


css = CSS.new


css.combine_css_files '/Users/healer/git/healer.com/Tpl/Home/Themes/default/css/main.css'